package ccy.ccysealegg;

import ccy.ccylibrary.config.annotation.ConfigFieldName;
import ccy.ccylibrary.config.annotation.Instance;
import ccy.ccylibrary.plugin.annotation.Config;
import ccy.ccylibrary.plugin.annotation.init;
import org.bukkit.inventory.ItemStack;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Config
public class config {
    private final String s = "WitherSkeletonSetup";
    private final String ss = "VillagerSetup";
    @Instance
    public static config con;
    public String MessageNotSeal;
    public String MessageSeal;
    public String MessageSpawn;
    public String MessageWorld;
    public ItemStack SealItem;
    public List<String> EntityList;
    public List<String> World;
    public List<String> SealLore;
    public Map<String, String> EntityNameMap;
    private List<String> EntityName;
    @ConfigFieldName(
            prefix = "WitherSkeletonSetup"
    )
    public int ID;
    @ConfigFieldName(
            prefix = "WitherSkeletonSetup"
    )
    public String useWorld;
    @ConfigFieldName(
            prefix = "WitherSkeletonSetup"
    )
    public String Message;
    @ConfigFieldName(
            prefix = "VillagerSetup"
    )
    public int villager_ID;
    @ConfigFieldName(
            prefix = "VillagerSetup"
    )
    public String villager_useWorld;
    @ConfigFieldName(
            prefix = "VillagerSetup"
    )
    public String villager_Message;

    public config() {
    }

    @init
    public void init() {
        this.EntityNameMap = new LinkedHashMap<>();
        this.EntityName.forEach((s) -> {
            String[] split = s.split(":");
            this.EntityNameMap.put(split[0], split[1]);
        });
    }
}